package com.chinackts.proceedspayment.exportproceeds.controller;

import com.alibaba.fastjson.JSONObject;
import com.chinackts.proceedspayment.exportproceeds.dto.ExportProceedsListDto;
import com.chinackts.proceedspayment.exportproceeds.query.ExportProceedsListQuery;
import com.chinackts.proceedspayment.exportproceeds.query.ExportProceedsPageQuery;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;

/**
 * @author Lianhong
 * @since 2021/11/18
 */
@Api(tags = "出口收汇")
public interface ExportProceedsControllerInterface {

    @ApiOperation("查询出口收汇列表")
    @GetMapping("/{id}/export-proceeds")
    ResponseEntity<ExportProceedsListDto> list(@PathVariable String id, @Valid ExportProceedsListQuery query);

    @ApiOperation("查询出口收汇列表（分页）")
    @GetMapping("/{id}/export-proceeds/paging")
    ResponseEntity<ExportProceedsListDto> pageList(@PathVariable String id, @Valid ExportProceedsPageQuery query);

    @ApiOperation("查询出口收汇明细")
    @GetMapping("/{id}/export-proceeds/{entryId}")
    ResponseEntity<JSONObject> details(@PathVariable String id, @PathVariable String entryId, @RequestParam(required = false)  boolean regather);

    @ApiOperation("出口收汇PDF下载")
    @PostMapping("/{id}/export-proceeds/pdf")
    ResponseEntity<Void> exportProceedsPdf(@PathVariable String id, @RequestBody List<String> entryIds, HttpServletResponse response);

}
